#include "processSchedule.h"
#include <fstream>

void ProcessSchedule::load() {

	std::ifstream rf("process.txt");
	if (rf) {
		while (rf) {
			Process* pro = new Process();
			rf >> pro->pid >> pro->pName  >> pro->runTime >> pro->priority;
			pro->state = 0;
			processList.push_back(pro);
		}
	}
}
void ProcessSchedule::fifo() {
	int count = processList.size();
	//for (auto pro = processList.begin(); pro != processList.end(); pro++) {
	//	pro.
	//}
	//for (int i = 0; i < count; i++) {
	//	Process* pro = processList[i];
	//	if (pro.state == 0) {
	//	
	//	}
	//}
}